#! /bin/bash

for i in `ls -d ./lib/*`;
do
    export JARS="$JARS,$i"
done

echo "JARS: ${JARS}"

T="$(date +%s)"
spark2-submit \
--master yarn \
--deploy-mode cluster \
--name GraphX \
--class com.soteradefense.dga.graphx.DGARunner \
--executor-cores 1 \
--num-executors 21 \
--executor-memory 32G \
--driver-memory 20G \
--jars ${JARS} \
--files "conf/application.conf,conf/log4j.properties" \
lib/dga-graphx-0.1.jar "$@"

T="$(($(date +%s)-T))"
echo "Time in seconds: ${T}"